package com.fileupload
import com.lucastex.grails.fileuploader.UFile

class DocumentUploadController {

    def index = {
        session["menupage"] = 2
        log.debug "Uploaded file with id=${params.ufileId}"
        [files: UFile.findAllByExtension("pdf"), params:params]
    }
    
    def upload = {
        
    }

    def delete = {
        def ufile = UFile.get(params.id)
        ufile.delete()
        redirect action:index
    }
    def pdfshow = {
        def ufile = UFile.get(params.id)
        [f:ufile]
    }
}
